<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" errorPage="../error.jsp"%>
    <jsp:useBean id="s" class="com.wsy.StringTrans"/>
    <jsp:useBean id="sql" class="com.wsy.selectsql"/>
    <jsp:useBean id="news" class="com.wsy.news"/>
    <jsp:setProperty property="*" name="news"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String id=news.getId().trim();
String title=news.getTitle().trim();
String content=news.getContent().trim();
String author=news.getAuthor().trim();
int i=sql.updateNews(title,content,author,id);
if(i==1){
%>
	<script language="javascript">
    alert("修改成功!");
     window.close();
    </script>
<%
	response.sendRedirect("newsBrowse.jsp");
}
 %>
</body>
</html>